package com.woniuxy.dudugua.controller;

import com.woniuxy.dudugua.entity.Coupon;
import com.woniuxy.dudugua.service.AddCouponService;
import org.springframework.format.annotation.DateTimeFormat;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.woniuxy.dudugua.util.Result;
import javax.annotation.Resource;
import java.util.Date;

@RestController
public class AddCouponController {

    @Resource
    private AddCouponService  addCouponService;
    @RequestMapping("addConpon")
    private Result  addByConpon(Coupon coupon) throws  Exception{
        System.out.println(coupon);
        return  new Result("200","success",addCouponService.addByCoupon(coupon),null);
    }
}
